<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns:MSHelp="http://www.microsoft.com/MSHelp/" lang="en-us" xml:lang="en-us"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="DC.Type" content="reference">
<meta name="DC.Title" content="tbb_allocator Template Class">
<meta name="DC.subject" content="allocator, tbb_allocator">
<meta name="keywords" content="allocator, tbb_allocator">
<meta name="DC.Relation" scheme="URI" content="../../reference/memory_allocation.htm">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="tbb_allocator_cls">
<meta name="DC.Language" content="en-US">
<link rel="stylesheet" type="text/css" href="../../intel_css_styles.css">
<title>tbb_allocator Template Class</title>
</head>
<body id="tbb_allocator_cls">
 <!-- ==============(Start:NavScript)================= -->
 <script src="..\..\NavScript.js" language="JavaScript1.2" type="text/javascript"></script>
 <script language="JavaScript1.2" type="text/javascript">WriteNavLink(2);</script>
 <!-- ==============(End:NavScript)================= -->
<a name="tbb_allocator_cls"><!-- --></a>


    <h1 class="topictitle1">tbb_allocator Template Class</h1>

    
<div><div class="section"><h2 class="sectiontitle">Summary</h2>
        <p>Template class for scalable memory allocation if available; possibly non-scalable otherwise.</p>

        </div>
<div class="section"><h2 class="sectiontitle">Syntax</h2>
        <pre>template&lt;typename T&gt; class tbb_allocator</pre>
        </div>
<div class="section"><h2 class="sectiontitle">Header</h2>
        <pre>#include "tbb/tbb_allocator.h"</pre>
        </div>
<div class="section"><h2 class="sectiontitle">Description</h2>
        <p>A <samp class="codeph">tbb_allocator</samp> allocates and frees memory via the Intel&reg; Threading Building Blocks (Intel&reg; TBB) malloc library if it is available, otherwise it reverts to using malloc and free.</p>

        <div class="Note"><h3 class="NoteTipHead">
					Tip</h3><p>Set the environment variable <samp class="codeph">TBB_VERSION</samp> to 1 to find out if the Intel&reg; TBB malloc library is being used. </p>
</div>
        <p>&nbsp;</p>
</div>

    </div>

    
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong>&nbsp;<a href="../../reference/memory_allocation.htm">Memory Allocation</a></div>
</div>
<div></div>

</body>
</html>
